package com.example.demo.demos.web.controller;


import com.example.demo.demos.web.service.TtsService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping(value = "/ttl")
public class TtsController {

  private final TtsService ttsService;

    public TtsController(TtsService ttsService) {
        this.ttsService = ttsService;
    }

    @GetMapping("/test")
    public ResponseEntity<String> test(){
        System.out.println("entry");
        String url = ttsService.buildAudioPlayUrl();
        return ResponseEntity.ok(url);
    }
}
